Skip to main content

remoteControlReceived

Type

message

Summary

Sent when the remote control is enabled and a remote control operation occurs.

Syntax

remoteControlReceived <pEventType> <pPosition>

Description

Handle the remoteControlReceived message if you want to perform an action when a remote control event occurs.

On iOS, the remote control feature allows access to the audio controls both on an external device and also on the device itself when in lockscreen.

On android, the remote control feature allows access to audio controls both on a notification, lockscreen and hardware buttons.

When the remote control is enabled and a remote control event occurs the remoteControlReceived message is send to the current card.

Parameters

NameTypeDescription

pEventType

enum

A string describing the event type which occurred.

  • "play"
  • "pause"
  • "stop"
  • "next track"
  • "previous track"
  • "seek" (android only)
  • "toggle play pause" (iOS only)
  • "begin seeking forward" (iOS only)
  • "begin seeking backward" (iOS only)
  • "end seeking forward" (iOS only)
  • "end seeking backward" (iOS only)

pPosition

number

The new seek position in milliseconds, "" if pEventType is not "seek" (android only)

Examples

on remoteControlReceived pEventType, pPosition
put pEventType & return after field "log"
end remoteControlReceived

command: mobileDisableRemoteControl, mobileEnableRemoteControl, mobileSetRemoteControlDisplay, iphoneSetAudioCategory

function: mobileRemoteControlEnabled

Compatibility and Support

Introduced

LiveCode 6.1

OS

android

ios

Platforms

mobile

Thank you for your feedback!

Was this page helpful?